hsc HSC - Features - Absolute URLs

Absolute URLs

Let's asume this directory structure for your html-project:
     prj/
     |
     +-image/
     | |
     | +-back.gif
     | |
     | +-logo.gif
     |
     +-people/
     | |
     | +-hugo.html
     | |
     | +-hugo.gif
     | |
     | :
     |
     +-main.html
If e.g. "main.html" wants to refer to "logo.gif", the situation is quite clear: Insert a
<IMG SRC="image/logo.gif">
in "main.html", and the logo will appear. But what if "hugo.html" will display the same logo? With relative URLs (as supported by html), you will have to insert a
<IMG SRC="../image/logo.gif">
And a file located another directory lever deeper will have to use "../../image/logo.gif" as path. Within big projects, this becomes very annoying because you always have to know in which directory level the file you are currently editing is located.

With absolute URLs, you can always use

<IMG SRC="image/logo.gif">
even from a file called e.g "people/ugly/blond/tall/sepp.html".

This becomes even more useful with the hsc-tag <$INCLUDE>: for example, you could write a file called "sign.hsc" that looks something like

<ADDRESS>
Hugo Heini (hugo@sepp.alm.at), <$INSERT TIME>
</ADDRESS>
</BODY>
</HTML>
and then include this file at the end of every file in your project, using <$INCLUDE FILE="sign.hsc"> independent of the location in the directory path of the including file. Well, maybe the term "absolut URL" is not really correct. Absolut URLs don not refer to absolut paths on your local disk. The refer relativ to the main directory of your project. Usually, this is the directory where your makefile is located and therefor hsc is envoked from. Everything clear now?

Of course, in the destination html-file, all absolute URLs are converted to annoing relativ URLs.

To work with absolut URLs, enable the AbsUrl switch. BACK


Thomas Aglassinger (agi@sbox.tu-graz.ac.at), 12-Sep-1995, 00:18